package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import cn.kawins.mybatis.interceptor.FillingCreateTime;
import cn.kawins.mybatis.interceptor.InsertAutoFilling;
import cn.kawins.mybatis.interceptor.UpdateAutoFilling;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author zhangxa
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Table(name = "HEALTH.tb_batch_upload_data")
public class BatchUploadData extends BaseModel<Integer> {

    @Column(name = "id")
    private Integer id;

    @Override
    public Integer idValue() {
        return id;
    }

    @ApiModelProperty(value = "图例名称")
    @Column(name = "legend_name")
    @ExcelProperty(value = "图例名称", index = 0)
    private String legendName;

    @ApiModelProperty(value = "曲线数量")
    @Column(name = "number_of_curves")
    @ExcelProperty(value = "曲线数量", index = 1)
    private Integer NumberOfCurves;

    @ApiModelProperty(value = "参数代号")
    @ExcelProperty(value = "参数代号", index = 2)
    @Column(name = "param_code")
    private String paramCode;

    @ApiModelProperty(value = "参数名称")
    @ExcelProperty(value = "参数名称", index = 3)
    @Column(name = "param_code_name")
    private String paramCodeName;

    @ApiModelProperty(value = "图片总数")
    @ExcelProperty(value = "图片总数", index = 4)
    @Column(name = "picture_num")
    private Integer pictureNum;

    @ApiModelProperty(value = "总个数")
    @ExcelProperty(value = "总个数", index = 5)
    @Column(name = "data_total")
    private Integer dataTotal;

    @ApiModelProperty(value = "卫星名称")
    @ExcelProperty(value = "卫星名称", index = 6)
    @Column(name = "satellite_name")
    private String satelliteName;


    @ApiModelProperty(value = "卫星代号")
    @ExcelProperty(value = "卫星代号", index = 7)
    @Column(name = "satellite_code")
    private String satelliteCode;


    @ApiModelProperty(value = "文件名称")
    @ExcelProperty(value = "文件名称", index = 8)
    @Column(name = "file_name")
    private String fileName;

    @ApiModelProperty(value = "文件标识")
    @ExcelProperty(value = "文件标识", index = 9)
    @Column(name = "file_logo")
    private Long fileLogo;

    @ApiModelProperty(value = "逻辑删除 0 删除 1正常")
    @Column(name = "is_delete")
    private Integer isDelete;

    @Column(name = "create_time")
    @ExcelProperty(value = "创建时间", index = 10)
    @InsertAutoFilling(value = FillingCreateTime.class)
    @ApiModelProperty(value = "创建时间", accessMode = ApiModelProperty.AccessMode.READ_ONLY, example = "2010-01-01 00:00:00")
    private Date createTime;

    @Column(name = "update_time")
    @ExcelProperty(value = "最后更新时间", index = 11)
    @UpdateAutoFilling(value = FillingCreateTime.class)
    @ApiModelProperty(value = "最后更新时间", accessMode = ApiModelProperty.AccessMode.READ_ONLY, example = "2010-01-01 00:00:00")
    private Date updateTime;

    @Transient
    private String[] paramCodes;
}